<!-- <template>
    <div class="background">
        <el-card>
            <el-form>
                <div>
                <div class="elinput">
                <el-input  v-model="input" 
                           placeholder="请输入内容" 
                           show-password
                           @keyup.enter.native="enter"
                           style="font-size: 17px"
                           >
                           <el-button slot="append" icon="el-icon-search" @click="enter"></el-button>        
                    </el-input>
                    </div>
                </div>
            </el-form>
</el-card>
</div>
</template>

<script>
import PageHeader from "../../components/PageHeader";
export default{
    components:{PageHeader},
    data(){
        return{
            input:'',
        }
    },
    methods:{
        enter(){
            if(this.input == "12345")
            {
                let routeUrl = this.$router.resolve({
                path: '/authorRes'});
                window.open(routeUrl .href, "_self");
            }
            else{
                console.log("密码错误！")
            }
        },

    }
}
</script>

<style scoped>
.background{
    position: relative;
    margin-top: 15%;
    max-width: 60%;
    left: 20%;
    right:20%
}

.elinput{
    position: relative;
    margin: auto;
    top:10px;
}
</style> -->

<template>
  
    <div class="search-author">
        <div class="background">
          <!-- <img src="../../assets/images/homebg.jpg" class="background" alt=""> -->
        </div>
      <el-card>
        <el-form @submit.native.prevent="goSearch">
        <div>
          <div class="input-box-body">
            <div class="title1">
                <h1>管理员认证</h1>
            </div>
            <div class="input-box">
              <el-input placeholder="请输入密码"
                        v-model="searchValue"
                        class="input-with-select"
                        @keyup.enter="goSearch"
                        style="font-size: 17px"
                        show-password>
                <el-button slot="append" icon="el-icon-arrow-right" @click="goSearch" type="button"></el-button>
              </el-input>
            </div>
          </div>
        </div>
      </el-form>
    </el-card>
    </div>
    </template>
    
    <script>
    import PageHeader from "../../components/PageHeader";
    
    export default {
      name: "searchAut",
      components: {PageHeader},
      data() {
        return {
          searchValue: '',
          select: 'name',
          options: [{
            value: 'name',
            label: '姓名'
          }, {
            value: 'affiliation',
            label: '机构'
          }],
        }
      },
      methods: {
        goSearch() {
          sessionStorage.setItem('is_admin', 'true')
          if (this.searchValue === '12345'){
            let routeUrl = this.$router.resolve({
            path: '/admin2'
          });
          window.open(routeUrl .href, "_self");
          }
          else{
            this.$message.error("密码错误！")
          }
        }
      }
    }
    </script>
    
    <style scoped>
    
    #title{
      font-family:'Noto Serif SC', serif;
      font-weight:800
    }
    
    .title1{
      position: relative;
      margin: auto;
      left: 40%;
      right: 40%;
    }
    
    .search-author {
      min-width: 1100px;
      position: absolute;
      margin: auto;
      top: 15%;
      right: 20%;
      left: 20%;
      bottom: 0;
      font-size:10ch
    }
    
    .search-author .input-box-body {
      padding-left: 7%;
      padding-right: 10%;
      text-align: left;
      font-size: 12px;
    }
    
    .search-author .background {
      position:absolute;
      width:100%;
      height:100%;
      left:0;
      z-index:-1;
      object-fit: cover;
    }
    
    .search-author .input-box {
      position: relative;
      margin: auto;

    }
    .search-author .input-box >>> .el-input.is-active .el-input__inner, .el-input__inner:focus {
      border: 5px solid #409EFF;
    }
    .search-author .input-box >>> .el-input__inner {
      height: 50px;
    }
    .search-author .input-box >>> .el-input-group__append {
      background-color: #409EFF;
      color: white;
      vertical-align: middle;
      display: table-cell;
      position: relative;
      border: none;
      border-radius: 0 6px 6px 0;
      padding: 0 20px;
      width: 1px;
      white-space: nowrap;
    }
    .search-author .input-box >>> .el-input-group__append:hover {
      background-color: #52a9ff;
    }
    .search-author .input-box >>> .el-input-group--prepend {
      border-radius: 6px 0 0 6px;
    }
    .search-author .input-box-body .input-box button {
      color: white;
    }
    
    .search-author .title {
      font-family: "Asap SemiBold",tahoma,arial,"Hiragino Sans GB",\5b8b\4f53, sans-serif;
      font-size: 60px;
      margin-top: 200px;
      color: #2f2e2e;
      font-weight: 600;
    }
    
    
    </style>